package second50;

import org.junit.jupiter.api.Test;

public class T0062 {
    int[][] ints;
    public int uniquePaths(int m, int n) {
        ints=new int[m][n];
        return a(m,n);
    }
    public int a(int m,int n){
        if (m == 1 || n == 1) return 1;
        if (ints[m-1][n-1]==0){
            ints[m-1][n-1]=a(m - 1, n) + a(m, n - 1);
        }
        return ints[m-1][n-1];
    }

    @Test
    public void test() {
        System.out.println(uniquePaths(51, 9));
    }
}
